//
//  TLCollectionViewCell.m
//  hnGovernment
//
//  Created by 安仔 on 2017/3/15.
//  Copyright © 2017年 安仔. All rights reserved.
//

#import "TLCollectionViewCell.h"

@implementation TLCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        [self setupView];
    }
    
    return self;
}

-(void)setupView
{
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.text = NSLocalString(@"行政许可事项减少到516项，事发看道林是都烦死了瑟吉欧几番四");
    self.titleLab.textColor = [UIColor colorWithHexString:@"343434"];
    self.titleLab.font = [UIFont systemFontOfSize:28*m6Scale];
    self.titleLab.numberOfLines = 0;
    [self.contentView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView.mas_centerY).offset(-26*m6Scale);
        make.left.mas_equalTo(self.contentView.mas_left).offset(10*m6Scale);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-10*m6Scale);
    }];
    
    self.placeLab = [[UILabel alloc] init];
    self.placeLab.text = NSLocalString(@"来源：河南新闻");
    self.placeLab.textColor = [UIColor colorWithHexString:@"8b8b8b"];
    self.placeLab.font = [UIFont systemFontOfSize:20*m6Scale];
    [self.contentView addSubview:self.placeLab];
    [self.placeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-18*m6Scale);
        make.left.mas_equalTo(self.titleLab.mas_left);
    }];
    
    self.timeLab = [[UILabel alloc] init];
    self.timeLab.text = NSLocalString(@"2017-02-28");
    self.timeLab.textColor = [UIColor lightGrayColor];
    self.timeLab.font = [UIFont systemFontOfSize:20*m6Scale];
    [self.contentView addSubview:self.timeLab];
    [self.timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.placeLab.mas_centerY);
        make.left.mas_equalTo(self.placeLab.mas_right).offset(30*m6Scale);
    }];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
}


@end
